import { request, withCancelToken } from '@/utils/request'


const homeData = () => {
  return request('/home/index',{method: 'get'})
}


const headNav = () => {
  return request('/home/category/head',{method: 'get'})
}

const hotData = () => {
  return request('/home/hot', {method: 'get'})
}

const goodsData = () => {
  return request('/home/goods',{method: 'get'})
}


const specialData = () => {
  return request('/home/special',{method: 'get'})
}



const [ homeDataSend ] = withCancelToken(homeData)
const [ headNavSend ] = withCancelToken(headNav)
const [ hotDataSend ] = withCancelToken(hotData)
const [ goodsDataSend ] = withCancelToken(goodsData)
const [ specialDataSend ] = withCancelToken(specialData)

export { homeDataSend,headNavSend,hotDataSend,goodsDataSend,specialDataSend }
